<template>
	<div class="doc_pc_components_Menu_performance">
		<Menu
			obj-key="id"
			:data="data"
			class="doc-menu"
		/>
	</div>
</template>

<script setup>
import {onMounted} from 'vue';
import {Menu} from 'powerful-ui/pc-default';

let id=0;
function build(sizeList,pre=''){
	if(sizeList.length){
		const size=sizeList[0];
		const list=new Array(size);
		const nextSizeList=sizeList.slice(1);
		for(let i=0;i<size;++i){
			list[i]={id:++id+'id',label:`节点${pre}-${i}`,children:build(nextSizeList,`${pre}-${i}`)};
		}
		return list;
	}
	return [];
}
const data=build([1000,10,10]);
console.log(id);

console.time('耗时');
onMounted(() => {
	console.timeEnd('耗时');
});
</script>

<style lang="scss">
.doc_pc_components_Menu_performance{
	.doc-menu{
		width:200px;
		height:400px;
		margin:20px;
		background:#fff;
	}
}
</style>